<!-- <include file="Public/uheader"/>  -->
<!DOCTYPE html>
<meta charset="utf-8">
  <meta name="renderer" content="webkit">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <title>俱乐部管理</title>
 <link rel="stylesheet" href="/yuejian08/Public/css/base.css">
  <link rel="stylesheet" href="/yuejian08/Public/css/page.css">
  <!--[if lte IE 8]>
  <link href="css/ie8.css" rel="stylesheet" type="text/css"/>
  <![endif]-->
  <script type="text/javascript" src="/yuejian08/Public/js/jquery.min.js"></script>
  <script type="text/javascript" src="/yuejian08/Public/js/main.js"></script>
  <script type="text/javascript" src="/yuejian08/Public/js/modernizr.js"></script>
  <!--[if IE]>
  <script src="http://libs.useso.com/js/html5shiv/3.7/html5shiv.min.js"></script>
  <![endif]-->
</head>
<body style="background: #f6f5fa;">

  <!--content S-->
  <div class="super-content RightMain" id="RightMain">
    
    <!--header-->
    <div class="superCtab">
      <div class="ctab-title clearfix"><h3>俱乐部管理</h3></div>
      
      <div class="ctab-Main">
        <div class="ctab-Main-title">
          <ul class="clearfix">
            <li class="cur"><a href="{:U('Club/clublist')}">俱乐部列表</a></li>
            <li><a href="{:U('Kclass/kclasslist')}">课程列表</a></li>
            <li><a href="{:U('Cvideo/cvideolist')}">视频列表</a></li>
          </ul>
        </div>
        
        <div class="ctab-Mian-cont">
          <div class="Mian-cont-btn clearfix">
            <div class="operateBtn">
              <a href="addclub.html" class="greenbtn publish">添加俱乐部</a>
              
            </div>
            <form action="{:U('Club/searchclub')}" method="get">
            <div class="searchBar">
              <input type="text" id="" value="" name="jname" class="form-control srhTxt" placeholder="输入俱乐部名称搜索">
              <input type="submit" class="srhBtn" value="">
            </div>
          </div>

            <div class="Mian-cont-wrap">
            <div class="defaultTab-T">
              <table border="0" cellspacing="0" cellpadding="0" class="defaultTable">
                <tbody>
                <tr>
                <th class="t_1">俱乐部ID</th>
                <th class="t_2">俱乐部图片</th>
                <th class="t_3">俱乐部名称</th>
                <th class="t_4">俱乐部介绍</th>
                <th class="t_5">俱乐部教练</th>
                <th class="t_6">教练电话</th>
                 <th class="t_7">俱乐部人数</th>
                 <th class="t_8">操作</th>
                </tr>
              </tbody></table>
            </div>
            <table border="0" cellspacing="0" cellpadding="0" class="defaultTable defaultTable2">
              <tbody>

              <volist name="club" id="val">
                            <tr>
                                <td class="t_1" align="center">{$val.jid}</td>
                                 <td class="t_2" align="center"> <img src="__PUBLIC__/images/{$val['pic']}" width="80"></td>
                                <td class="t_3" align="center">{$val.jname}</td>
                                <td class="t_4" align="center">{$val.intro}</td>
                                <td class="t_5" align="center">{$val.teacher}</td>
                                <td class="t_6" align="center">{$val.tel}</td>
                                <td class="t_7" align="center">{$val.number}</td>
                                 
                <td class="t_8">
                <div class="btn">
                <a href="{:U('Club/clubmod')}?id={$val['jid']}" class="modify">修改</a>
               <!--  <a   href="#"  class="delete" id="{$clublist.jid}">删除</a> -->
                <!-- <a href="{:U('Club/delclub')}?id={$val['jid']}" class="delete">删除</a> -->
                 <a href="{:U('Club/delclub',array('id'=>$val['jid']))}" class="delete">删除</a>

                </div>
                </td>               
                </tr>
                </volist>
            </tbody>
            </table>
            <!--pages S-->
           <div class="pageSelect">
              <span>共 <b>1</b> 条 每页 <b>10 </b>条   1/1</span>
              <div class="pageWrap">
                <a class="pagePre"><i class="ico-pre">&nbsp;</i></a>
                <a href="#" class="pagenumb cur">1</a>
                <a href="#" class="pagenumb">2</a>
                <a href="#" class="pagenumb">3</a>
                <a href="#" class="pagenext"><i class="ico-next">&nbsp;</i></a>
              </div>
            </div>
            <!--pages E-->
           <!--  <script type="text/javascript">
                $(function(){
                  $(".delete").click(function(){
                    var jid=$(this).attr("id");
                    var delrow=$(this).parent().parent().parent();
                
                    $.ajax({
                      url:"{:U('Club/delclub')}",
                      data:{'jid':jid},
                      dataType:'json',
                      type:'POST',
                      success:function(msg){
                        if(msg=1){
                          delrow.remove();
                        }else{
                          alert('删除失败');
                        }
                        
                      }
                    });
                  });
                });
              </script> -->
          </div>
        
        </div>
      </div>
    </div>
    <!--main-->
    
  </div>
  <!--content E-->
  
  <div class="layuiBg"></div><!--公共遮罩-->


<script type="text/javascript" src="__PUBLIC__/js/zxxFile.js"></script>
<script>
var params = {
  fileInput: $("#fileImage").get(0),
  upButton: $("#fileSubmit").get(0),
  url: $("#uploadForm").attr("action"),
  filter: function(files) {
    var arrFiles = [];
    for (var i = 0, file; file = files[i]; i++) {
      if (file.type.indexOf("image") == 0) {
        if (file.size >= 512000) {
          alert('您这张"'+ file.name +'"图片大小过大，应小于500k');  
        } else {
          arrFiles.push(file);  
        }     
      } else {
        alert('文件"' + file.name + '"不是图片。');  
      }
    }
    return arrFiles;
  },
  onSelect: function(files) {
    var html = '', i = 0;
    $("#preview").html('<div class="upload_loading"></div>');
    var funAppendImage = function() {
      file = files[i];
      if (file) {
        var reader = new FileReader()
        reader.onload = function(e) {
          $('.XgfileImg img').attr('src', e.target.result);
          $('.sp-photo').addClass('cur');
          html = html + '<div id="uploadList_'+ i +'" class="upload_append_list"><p><span>' + file.name + '</span>'+ 
            '<a href="javascript:" class="upload_delete" title="删除" data-index="'+ i +'">删除</a>' +
          '</div>';
          
          i++;
          funAppendImage();
        }
        reader.readAsDataURL(file);
      } else {
        $("#preview").html(html);
        if (html) {
          //删除方法
          $(".upload_delete").click(function() {
            ZXXFILE.funDeleteFile(files[parseInt($(this).attr("data-index"))]);
            $('.sp-photo').removeClass('cur').html('栏目图片');
            return false; 
          });
          //提交按钮显示
          $("#fileSubmit").show();  
        } else {
          //提交按钮隐藏
          $("#fileSubmit").hide();  
        }
      }
    };
    funAppendImage();   
  },
  onDelete: function(file) {
    $("#uploadList_" + file.index).fadeOut();
  },
  onDragOver: function() {
    $(this).addClass("upload_drag_hover");
  },
  onDragLeave: function() {
    $(this).removeClass("upload_drag_hover");
  },
  onProgress: function(file, loaded, total) {
    var eleProgress = $("#uploadProgress_" + file.index), percent = (loaded / total * 100).toFixed(2) + '%';
    eleProgress.show().html(percent);
  },
  onSuccess: function(file, response) {
    $("#uploadInf").append("<p>上传成功，图片地址是：" + response + "</p>");
  },
  onFailure: function(file) {
    $("#uploadInf").append("<p>图片" + file.name + "上传失败！</p>");  
    $("#uploadImage_" + file.index).css("opacity", 0.2);
  },
  onComplete: function() {
    //提交按钮隐藏
    $("#fileSubmit").hide();
    //file控件value置空
    $("#fileImage").val("");
    $("#uploadInf").append("<p>当前图片全部上传完毕，可继续添加上传。</p>");
  }
};
ZXXFILE = $.extend(ZXXFILE, params);
ZXXFILE.init();

</script>

</body></html>
<include file="Public/footer"/> 